﻿#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    //组件设置
    ui->setUp->setStyleSheet("QPushButton{border-image: url(:/setUp1.png);}"
                             "QPushButton:hover{border-image: url(:/setUp1Pre.png);}" );
    ui->out->setStyleSheet("QPushButton{border-image: url(:/out.png)}"
                           "QPushButton:hover{border-image: url(:/outHover.png);}" );
    //组件操作
    connect(ui->out,QPushButton::clicked,this,this->out);
    connect(ui->first,QPushButton::clicked,this,this->playGame);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::out(){
    this->close();
}//将关闭所有窗口

void MainWindow::playGame(){
    this->hide();
    fir.show();
}
